package com.lzh.farmersshop.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * (Goods)实体类
 *
 * @author makejava
 * @since 2024-01-04 15:37:11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Goods implements Serializable {
    private static final long serialVersionUID = -35340919247001071L;
    /**
     * 商品id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 商品名称
     */
    private String title;
    /**
     * 类型id
     */
    private Integer typeid;
    /**
     * 商品图
     */
    private String img;
    /**
     * 商品描述
     */
    @TableField("`describe`")
    private String describe;
    /**
     * 商品价格
     */
    private BigDecimal price;
    /**
     * 商品库存
     */
    private Integer stock;
    /**
     * 1上架2下架
     */
    private Integer state;
    /**
     * 1正常2已删除
     */
    private Integer isdelete;
    /**
     * 发布时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;
    /**
     * 商品详情
     */
    @TableField("`detail`")
    private String detail;
    /**
     * 商品详情代码
     */
    @TableField("`detailhtml`")
    private String detailhtml;


}
